﻿using System;
using System.Collections.Generic;
using UnityEngine;

namespace UFrame
{
    /// <summary>
    /// 对象池间接接口
    /// 对PoolMa 进行封装操作
    /// </summary>
    public class PoolMonoMa : MonoBehaviour
    {
        public List<PoolDic> prepare = new List<PoolDic>();

        [Serializable]
        public class PoolDic
        {
            public string name;
            public GameObject go;
        }

        public void Awake()
        {
            for (int i = 0; i < prepare.Count; i++)
            {
                var p = prepare[i];
                if (p.go == null)
                    continue;
                if (string.IsNullOrEmpty(p.name))
                    continue;

                PoolMa.PrepareObj(p.name, p.go);
            }
        }
    }
}